package com.example.librarymanagement.vo;

import com.example.librarymanagement.util.DateFormatUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @author lzx
 */

@Data
@Accessors(chain = true)
public class BookAddRecordVo {

    @ApiModelProperty(value = "书id")
    private Integer bookId;

    @ApiModelProperty(value = "书名")
    private String cName;

    @ApiModelProperty(value = "书名")
    private String name;

    @ApiModelProperty(value = "入库数量")
    private Integer number;

    @ApiModelProperty(value = "新增时间")
    private String addTime;

    public void setAddTime(Date addTime) {
        if (addTime != null) {
            this.addTime = DateFormatUtil.convertDateToString(addTime);
        }
    }
}
